<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<html>
<head>
    <meta charset="utf-8"/>
    <th:block th:include="include :: header('租借订单详情')"/>
</head>
<link href="../../../static/css/index.css" th:href="@{/css/index.css}" rel="stylesheet"/>
<body>
<div class="top">
    <div class="top-k">
        <div class="top-k-zi">
            订单号: <span th:text="${usedDetailVo.orderNumber}"></span> (<span th:text="${usedDetailVo.statusMsg}"></span>)
        </div>
        <div class="top-k-zi1">
            微信商户订单号/支付宝授权号: <span th:text="${usedDetailVo.authNumber}"></span>
        </div>
    </div>
    <div class="top-k1">
        <div class="top-k1-k">
            <div class="top-k1-k-zi">
                <span th:text="${usedDetailVo.orderMonery}"></span>元
            </div>
            <div class="top-k1-k-zi">
                订单金额
            </div>
        </div>
        <div class="top-k1-k">
            <div class="top-k1-k-zi">
                <span th:text="${usedDetailVo.amountPaid}"></span>元
            </div>
            <div class="top-k1-k-zi">
                实付金额
            </div>
        </div>
        <div class="top-k1-k">
            <div class="top-k1-k-zi">
                <span th:text="${usedDetailVo.discountAmount}"></span>元
            </div>
            <div class="top-k1-k-zi">
                优惠金额
            </div>
        </div>
        <div class="top-k1-k">
            <div class="top-k1-k-zi">
                <span th:text="${usedDetailVo.refundAmount}"></span>元
            </div>
            <div class="top-k1-k-zi">
                退款金额
            </div>
        </div>
    </div>
    <div class="top-k2">

        <input type="hidden" id="usedId" th:value="${usedDetailVo.id}"/>
        <div class="top-k2-an"
             th:if="${(usedDetailVo.status == 1 || usedDetailVo.status == 2) && usedDetailVo.amountPaid > 0 && usedDetailVo.canRefund == 1 }">
            <a class="btn btn-primary btn-xs refund" href="javascript:void(0)">退单</a>
        </div>

        <div class="top-k2-an"
             th:if="${usedDetailVo.status == 0 && usedDetailVo.isBack == 1 && usedDetailVo.borrowStatus == 1}">
            <a class="btn btn-info btn-xs endUsed" href="javascript:void(0)">强制结束</a>
        </div>
        <!--<div class="top-k2-an1">-->
        <!--补充交易单号-->
        <!--</div>-->
    </div>
</div>
<div class="fg"></div>
<div class="neir">
    <div class="neir-top">
        订单基础信息
    </div>
    <!--<div class="neir-k">-->
    <!--<div class="neir-k-zi">-->
    <!--UID : 2154518416519684-->
    <!--</div>-->
    <!--<div class="neir-k-zi1">-->
    <!--PID : 2154518416519684-->
    <!--</div>-->
    <!--</div>-->
    <div class="neir-k">
        <div class="neir-k-zi">
            客户ID : <span th:text="${usedDetailVo.appUserId}"></span>
        </div>
        <div class="neir-k-zi1">
            订单创建时间 : <span th:text="${usedDetailVo.createTime}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            订单支付时间 : <span th:text="${usedDetailVo.orderPayTime}"></span>
        </div>
        <div class="neir-k-zi1">
            订单归还时间 : <span th:text="${usedDetailVo.orderReturnTime}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            小宝编号 : <span th:text="${usedDetailVo.batterySn}"></span>
        </div>
        <div class="neir-k-zi1">
            小宝更新时间 : <span th:text="${usedDetailVo.batteryUpdateTime}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            小宝状态 : <span th:text="${usedDetailVo.batteryStatus}"></span>
        </div>
    </div>
    <div class="fg1"></div>
    <div class="neir-top">
        订单出借归还信息
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            归还信息
        </div>
        <div class="neir-k-zi1">
            出借信息
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            设备编号 : <span th:text="${usedDetailVo.returnDevSn}"></span>
        </div>
        <div class="neir-k-zi1">
            设备编号 : <span th:text="${usedDetailVo.boorowDevSn}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            仓位编号 : <span th:text="${usedDetailVo.returnSlot}"></span>
        </div>
        <div class="neir-k-zi1">
            仓位编号 : <span th:text="${usedDetailVo.borrowSlot}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            合作商姓名(手机号码) : <span th:text="${usedDetailVo.partnerName}"></span> (<span
                th:text="${usedDetailVo.partnerPhone}"></span>)
        </div>
        <div class="neir-k-zi1">
            合作商姓名(手机号码) : <span th:text="${usedDetailVo.borPartnerName}"></span> (<span
                th:text="${usedDetailVo.borPartnerPhone}"></span>)
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            商户主体名称(手机号码) : <span th:text="${usedDetailVo.backMerchantName}"></span> (<span
                th:text="${usedDetailVo.backMerchantMerchantPhone}"></span>)
        </div>
        <div class="neir-k-zi1">
            商户主体名称(手机号码) : <span th:text="${usedDetailVo.borMerchantName}"></span> (<span
                th:text="${usedDetailVo.borMerchantPhone}"></span>)
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            门店名称(门店编号) : <span th:text="${usedDetailVo.storeName}"></span> (<span
                th:text="${usedDetailVo.storeCode}"></span>)
        </div>
        <div class="neir-k-zi1">
            门店名称(门店编号) : <span th:text="${usedDetailVo.borStoreName}"></span> (<span
                th:text="${usedDetailVo.borStoreCode}"></span>)
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            门店所在地区 : <span th:text="${usedDetailVo.storeAddress}"></span>
        </div>
        <div class="neir-k-zi1">
            门店所在地区 : <span th:text="${usedDetailVo.borStoreAddress}"></span>
        </div>
    </div>
    <div class="neir-k">
        <div class="neir-k-zi">
            详细地址 : <span th:text="${usedDetailVo.storeDetailAddress}"></span>
        </div>
        <div class="neir-k-zi1">
            详细地址 : <span th:text="${usedDetailVo.borStoreDetailAddress}"></span>
        </div>
    </div>
</div>
</body>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var prefix = ctx + "system/used";

    $(".refund").click(function () {
        var usedId = $("#usedId").val();
        var url = prefix + "/refundMoney/" + usedId;
        $.modal.open("订单退款", url, 800, 460);
    });


    $(".endUsed").click(function () {
        var usedId = $("#usedId").val();
        var url = prefix + "/endUsed/" + usedId;
        $.modal.open("结束租借订单", url, 800, 460);
    });

</script>
</html>
